function ListDataManager($scope,ApiManager) {
  this.page = 0;
  this.totalCount = -1;
  this.pageSize = 10;
  this.dataList = [];
  this.isLoading = false;

  //需要实现获取数据的方法
  this.requestData = function(){};
  var self = this;
  this.success = function (result) {
    self.isLoading = false;

    //TODO 不太优雅
    $scope.$broadcast('scroll.refreshComplete'); //取消下拉刷新
    $scope.$broadcast('scroll.infiniteScrollComplete'); //取消上拉加载
    if (ApiManager.hasError(result)) {
      return;
    }

    if (self.page === 0) {
      //reload
      self.dataList = [];
    }

    self.dataList = self.dataList.concat(result.data);
    self.totalCount = result.total_count;
    self.pageSize = result.page_size;
    self.page = result.page;
  };

  this.failure = function (error) {
    ApiManager.showError(error);
  };

  this.loadData = function () {
    if (!this.isLoading) {
      this.isLoading = true;
      this.requestData();
    }
  };

  this.loadMore = function () {
    if (self.hasNextPage()) {
      self.loadData();
    }
  };

  this.reloadData = function () {
    this.page = 0;
    this.totalCount = 0;
    this.loadData();
  };

  this.hasNextPage = function () {
    return self.pageSize * self.page < self.totalCount;
  };

  this.nextPage = function () {
    return this.page + 1;
  };

  this.showNoData = function () {
    return !(this.dataList && this.dataList.length > 0);
  };
}
